module.exports = {
	get(selector) {
		return document.querySelector(selector);
	},
	getAll(selector) {
		return document.querySelectorAll(selector);
	},

	renderFtr(name) {
		let html = `
		<a href="./index.html" class="${name === "index" ? "active" : ""}">
			<i class="iconfont icon-index"></i>
			<span>首页</span>
		</a>
		<a href="./sport.html" class="${name === "sport" ? "active" : ""}">
			<i class="iconfont icon-sport"></i>
			<span>运动</span>
		</a>
		<a href="./mine.html" class="${name === "mine" ? "active" : ""}">
			<i class="iconfont icon-my"></i>
			<span>我的</span>
		</a>
		`;

		this.get(".footer").innerHTML = html;
	},
};
